import { Body, Controller, Post } from '@nestjs/common';
import { AuthService } from './auth.service';
import { LoginParamsDto } from './dto';
@Controller()
export class AuthController {
  constructor(private readonly authService: AuthService) {}
  @Post('login')
  async login(@Body() loginParams: LoginParamsDto) {
    return this.authService.login(loginParams);
  }
  @Post('register')
  async register(@Body() loginParams: LoginParamsDto) {
    return this.authService.register(loginParams);
  }
}
